const mongoose = require("mongoose")

// 验证账号是否已存在
module.exports.usernameIsExist_3 = async function(data){
    let result = await mongoose.model("platformAdminsModel").find(data);
    return result;
}

// 平台管理员新用户注册
module.exports.platformRegister_3 = async function(data){
    data = {...data, status:"申请中"}
    let result = await mongoose.model("platformAdminsModel").create(data);
    return result;
}

// 店铺管理员新用户注册
module.exports.storeRegister_3 = async function(data){
    data = {...data, status:"申请中"}
    let result = await mongoose.model("storeAdminsModel").create(data);
    return result;
}

//平台管理员登陆

module.exports.login1 = async function(data){
    return await mongoose.model("storeAdminsModel").find(data);
}



//店铺管理员登陆
module.exports.login2 = async function(data){
    console.log(data)
    return await mongoose.model("platformAdminsModel").find(data);
}